package com.party.controller.api;


import com.party.common.base.ApiResult;
import com.party.common.entity.MyPage;
import com.party.entity.PbUserResourceHistory;
import com.party.entity.dto.QueryResourceDto;
import com.party.service.PbUserResourceHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 资源 前端控制器
 * </p>
 *
 * @author ccl
 * @since 2024-10-31
 */
@RestController
@RequestMapping("api/pb-user-resource-history")
@Api(tags = "用户浏览历史记录api接口", value = "用户浏览历史记录api接口")
public class PbUserResourceHistoryController {

    @Resource
    private PbUserResourceHistoryService pbUserResourceHistoryService;

    @PostMapping("queryPage")
    @ApiOperation("分页查询")
    public ApiResult<MyPage<PbUserResourceHistory>> queryPage(@RequestBody QueryResourceDto dto){
        MyPage<PbUserResourceHistory> resourceHistoryMyPage = pbUserResourceHistoryService.queryPage(dto);
        return ApiResult.ok(resourceHistoryMyPage);
    }
}

